<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

/**
 * App\Project
 *
 * @property int $project_id
 * @property string|null $name
 * @property int|null $isDisplay
 * @property int|null $created_time
 * @property int|null $updated_time
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Project newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Project newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Project query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Project whereCreatedTime($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Project whereIsDisplay($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Project whereName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Project whereProjectId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Project whereUpdatedTime($value)
 * @mixin \Eloquent
 * @property int|null $type
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Project whereType($value)
 * @property string|null $company_name
 * @property string|null $company_num
 * @property string|null $file
 * @property string|null $start_time
 * @property string|null $end_time
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Project whereCompanyName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Project whereCompanyNum($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Project whereEndTime($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Project whereFile($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Project whereStartTime($value)
 */
class Project extends Model
{
    protected $table="5kcrm_project";
    protected $primaryKey="project_id";
    public static function getSelectOptions()
    {
        $options = self::select('project_id as id','name as text')->get();
        $selectOption = [];
        foreach ($options as $option){
            $selectOption[$option->id] = $option->text;
        }
        return $selectOption;
    }
}
